package com.realgodo.site.entity.common;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Table;

import com.realgodo.site.entity.IdEntity;


/**
 * 附件父类，方便后期垃圾文件处理
 * @author ljw E-mail: ssdutljw@163.com
 * @version 创建时间：2009-12-13
 */
@Entity(name = "Attachment")
@Inheritance(strategy = InheritanceType.JOINED)
@Table(name = "attachment")
public class Attachment extends IdEntity {
	/***/
	private static final long serialVersionUID = 5580574528546313572L;
	public static final int DELETED=1;
	public static final int NOT_DELETED=0;
	/**路径*/
	private String path;
	/**名称*/
	private String name;
	/**引用路径*/
	private String fullPath;
	
	
	@Column(name = "full_path")
	public String getFullPath() {
		if(fullPath==null){
			return path+name;
		}
		return fullPath;
	}
	
	public void setFullPath(String fullPath) {
		this.fullPath = fullPath;
	}



	/**是否删除*/
	private int isDelete=NOT_DELETED;

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	public int getIsDelete() {
		return isDelete;
	}

	public void setIsDelete(int isDelete) {
		this.isDelete = isDelete;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	

}
